export {};
/* 
    axios({
      url: 'url',
      method: 'get'
    })
    如果发送 GET 请求， method 参数可以不传，所以 method 是可选的
*/

type ObjType = {
  url: string;
  method?: string;
};
const axios = (obj: ObjType): void => {
  console.log("obj", obj);
};

axios({
  url: "api",
});
axios({
  url: "api",
  method: "POST",
});
